package yichang;
import java.util.Scanner;
public class learn {
    public static void main(String [] arsgs)throws Exception {
       try {
           Scanner sc = new Scanner(System.in);
           System.out.println("输入1~3之间任意一个数字");
             int num1= sc.nextInt();
             int num2=num1;
             switch (num2){
                 case 1:
                     System.out.println("数学课");
                     break;
                 case 2:
                     System.out.println("语文");
                     break;
                 case 3:
                     System.out.println("英语");
                     break;
             }
           throw new Exception("输入有误");

       }
       catch (Exception e){
         e.printStackTrace();
       } finally{
               System.out.println("非常感谢使用程序");
       }
    }
}


